package de.gee.erep.shared.entities.country;

import com.google.gwt.user.client.rpc.IsSerializable;

/***/
public class Region implements IsSerializable, Comparable<Region> {
	/***/
	private int id;
	/***/
	private String name;

	/**
	 * @param id
	 *            id
	 * @param name
	 *            name
	 */
	public Region(final int id, final String name) {
		super();
		this.id = id;
		this.name = name;
	}
	/***/
	private Region() { }
	/**
	 * 
	 * @return int
	 */
	public final int getId() {
		return id;
	}

	/**
	 * @return String
	 */
	public final String getName() {
		return name;
	}

	@Override
	public final String toString() {
		return "[ Region: " + getName() + "]";
	}

	/**
	 * @see java.lang.Comparable#compareTo(java.lang.Object)
	 * @param r Region
	 * @return int erg
	 */
	@Override
	public final int compareTo(final Region r) {
		return new Integer(id).compareTo(r.id);
	}
}
